package com.SmileBreaker;

import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.View;

public class HelpView extends View {
	
	private HelpActivity activity;

	public HelpView(Context context, AttributeSet attrs) {
		super(context, attrs);
		activity = (HelpActivity) context;
	}

	@Override
	protected void onDraw(Canvas canvas) {
		canvas.translate(DisplayInfo.startPaintPoint.getX(), DisplayInfo.startPaintPoint.getY());
		canvas.scale(DisplayInfo.displayRatio, DisplayInfo.displayRatio);
		
		canvas.drawBitmap(activity.getBackground(), 0, 0, null);
		canvas.drawBitmap(activity.getGame_info(),
						(DisplayInfo.LOGICAL_WIDTH-activity.getGame_info().getWidth())/2,
						(int)(40*DisplayInfo.WHOLE_RATIO), null);
		canvas.drawBitmap(activity.getCredit(),
				(DisplayInfo.LOGICAL_WIDTH-activity.getCredit().getWidth())/2,
				(int)(80*DisplayInfo.WHOLE_RATIO)+activity.getGame_info().getHeight(), null);
		activity.getBtn_okay().Draw(canvas);
		
		super.onDraw(canvas);
	}
}
